home *** CD-ROM | disk | FTP | other *** search
- Path: manawatu.planet.co.nz!news
- From: ctutty@manawatu.gen.nz (Chris Tutty)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel
- Subject: Re: Hungarian notation
- Date: Wed, 03 Jan 1996 07:39:01 GMT
- Organization: PlaNet (NZ) Manawatu, Palmerston Nth, New Zealand +64 6 357-9245
- Message-ID: <4cd8fc$oud@news.manawatu.gen.nz>
- References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4behis$3cl@dux.dundee.ac.uk> <RIGOTTI.95Dec29100514@roach.dra.hmg.gb>
- NNTP-Posting-Host: ctutty.manawatu.gen.nz
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- X-Newsreader: Forte Free Agent v0.55
-
- I've always disliked HN, not only because it can make the variable
- names less readable, but because it violates a basic principle - that
- of avoiding unnecessary redundancy.
-
- My opionion: HN should not be used in any typed language because it
- creates an opportunity for the actual declared type of a variable
- (which the machine uses) to be different from it's HN prefix (which
- the programmer uses).
-
- This is the sort of thing that causes maintenance problems. To find
- out a variable's type you should always search for the initial
- declaration. To make a type-dependent decision on the basis of a
- comment is asking for trouble.
-
- I agree that it's use within Windows programming helps to clearly
- identify variables which connect to Windows objects, but only where
- the prefixes are limited to those which are clear and simple. There's
- no point in loooking up a list of prefixes to find out what a
- variable's type used to be when the program was originally written.
-
- I suppose that if you have to deliver on promises as rapidly as M$
- does, then you can't afford luxuries like checking the side-effects of
- code changes. HN lets M$ think that they can treat lines of code in
- isolation, allowing changes to be made quickly without the need to
- trace the background surrounding the code being changed. Yes???
-
- Chris
- ctutty@manawatu.gen.nz
-
-